package cn.cdqf.global.common;

public enum ResultEnum {

    /**
     * 601:请求成功
     * 701:请求失败
     * 702:未登录
     * 703:权限不足
     * 704:请求参数错误
     */

    SUCCESS(601,"请求成功"),

    LOGIN_FAIL(710,"登录失败"),

    USERNAME_ERROR(705,"用户名错误"),

    PASSWORD_ERROR(706,"密码错误"),

    FAIL(701,"请求失败"),

    NO_LOGIN(702,"未登录"),

    NO_AUTHORITY(703,"权限不足"),

    PARAM_ERROR(704,"请求参数错误"),

    USERNAME_REPEAT(707,"用户名重复"),

    TELEPHONR_REPEAT(708,"电话已注册"),

    EMAIL_REPEAT(709,"邮箱已注册");



    private int code;

    private String message;

    ResultEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
